package com.yb.nowcoder;

import java.util.Arrays;
import java.util.Scanner;

/**
 * 华为机试练习第5题
 */
public class Main22 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextLine()) {
            String str = scanner.nextLine();
            String[] arr = str.split(",");
            int len = arr.length;
            if (len > 0) {
                Integer[] in = new Integer[len];
                for (int i = 0; i < len; i++) {
                    in[i] = Integer.parseInt(arr[i]);
                }
                Arrays.sort(in, (arg0, arg1) -> arg1 - arg0);
                StringBuilder sb = new StringBuilder();
                // 输出所在的坐标
                int[] out = new int[len];
                for (int i = 0; i < len; i++) {
                    int c = Integer.parseInt(arr[i]);//乱序的数组
                    for (int j = 0; j < len; j++) {
                        if (in[j] == c && in[j] != -1) {
                            out[i] = j;
                            sb.append(j + ",");
                            in[j] = -1;
                            break;
                        }
                    }
                }
                System.out.println(sb.toString().substring(0, sb.toString().length() - 1));
            }
        }
    }
}
